From 524bb4cb34039f508a7962558c69aaf614132903 Mon Sep 17 00:00:00 2001 From: parkrrrr Date: Tue, 26 Oct 2004 15:28:52 +0000 Subject: [PATCH] add #break statement to arc files for gaps in the arc --- gpsbabel/README | 5 +++++ gpsbabel/arcdist.c | 7 ++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/gpsbabel/README b/gpsbabel/README index bd6cf7ac5..dd1dead27 100644 --- a/gpsbabel/README +++ b/gpsbabel/README @@ -745,6 +745,11 @@ DATA FILTERS 41.144270897 -85.163655281 41.141953468 -85.162882805 + An arc file may optionally contain gaps in the arc. You can + specify such a gap by inserting a line containing "#break" + either on a line by itself or after the coordinates of the + starting point of the new arc segment. + In addition to the file containing the arc, you should also specify the maximum distance from the arc that will be accepted; that distance is declared on the command line with the diff --git a/gpsbabel/arcdist.c b/gpsbabel/arcdist.c index 3fc13459a..800c45dd4 100644 --- a/gpsbabel/arcdist.c +++ b/gpsbabel/arcdist.c @@ -74,7 +74,12 @@ arcdist_process(void) fileline++; pound = strchr( line, '#' ); - if ( pound ) *pound = '\0'; + if ( pound ) { + if ( 0 == strncmp( pound, "#break", 6)) { + lat1 = lon1 = BADVAL; + } + *pound = '\0'; + } lat2 = lon2 = BADVAL; argsfound = sscanf( line, "%lf %lf", &lat2, &lon2 ); -- 2.30.2